package physgin;

/**
 * Describes the structure of a cache of resources.
 */
interface ResourceCache<A,B> 
    {
        /**
         * Loads a resource of type B using an identifier 
         * of type A.
         * If the resource has been previously accessed it
         * should be cached.
         *
         * @param   f   An identifier of type A.
         * @return      A resource of type B
         */
        B loadResource(A f);
    }
